Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): add request override support #12

Merged
merged 4 commits into from
May 23, 2022
Merged

feat(core): add request override support #12

merged 4 commits into from
May 23, 2022

Conversation

kiran94
Copy link

@kiran94 kiran94 commented May 22, 2022

Changes

  • Added ability to provide request overrides at runtime
    • request_overrides is merged with the parameters defined in the collection
    • For example, at my company we leverage postman collections for quality checks. It can be tedious to override request headers for a large collection so this change should improve productivity
  • Bumped Version
    • Normally I would bump minor here as it's a new feature but since we are still within 0.0 range, I opted to just bump the patch
  • Added Testing
    • I noticed there was no testing happening at the moment and I wanted to add cases for this new feature so I went ahead and added some (pytest)
    • Ideally we want this to run in CI but didn't want to increase scope of PR

Examples

headers  = { "MyHeader": "Value" }
pp = PostPython('collections/tests.postman_collection.json', request_overrides={
    'headers': headers
})

Verification

  • I've run test.py and it current behaviour seems to be working fine
  • Added Unit Tests for new behaviour

@kiran94 kiran94 marked this pull request as ready for review May 22, 2022 11:42
@kiran94
Copy link
Author

kiran94 commented May 22, 2022

@matkapi I don't have permission to request your review here so tagging you directly. Please review if you have some time 😄

@matkapi matkapi merged commit 0738d19 into matkapi:master May 23, 2022
@kiran94 kiran94 deleted the feat/add-request-override-support branch May 23, 2022 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants